package com.happyhome.services;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.happyhome.dao.UtilityDao;
import com.happyhome.datamodel.Utility;

@Service
public class UtilityServiceImpl implements UtilityService{
	
	@SuppressWarnings("unused")
	private static final Logger LOGGER = LoggerFactory.getLogger(UtilityServiceImpl.class);
	
	@Autowired
    private UtilityDao utilityDao;

	public List<Utility> getAllUtilities(){
		return utilityDao.getAllUtilities();
	}

	@Override
	public Utility getUtilityByCode(String code) {
		return utilityDao.getUtilityByCode(code);
	}

	@Override
	public List<Utility> getAllUtilitiesByAId(Long aId) {
		return utilityDao.getAllUtilitiesByAId(aId);
	}
}
